package com.yiyuplatform.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @Description
 * @Author dalong
 * @Date 2021-11-08
 */

@Getter
@Setter
@ToString
@NoArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
@Entity
@Table(name = "bbs_t_post_sub")
public class BbsTPostSub implements Serializable {
    private static final long serialVersionUID = 4545193124556266431L;

    /**
     * 回帖uuid,插入时使用uuid()生成uuid
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "CO_ID")
    private String coId;

    /**
     * 回帖所属主贴的uuid,外键
     */
    @Column(name = "CO_POST_ID")
    private String coPostId;

    /**
     * 回帖内容,前端限制长度
     */
    @Column(name = "CO_TEXT")
    private String coText;

    /**
     * 回帖时间
     */
    @Column(name = "CO_TIME")
    private Timestamp coTime;

    /**
     * 回帖人id
     */
    @Column(name = "CO_USERID")
    private String coUserid;

}
